package com.dm.client;

import com.dm.config.DmConfiguration;
import com.dm.fallback.DmPayTradeClientFallBack;
import com.dm.pojo.DmPayTrade;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
* Feign
*/
@FeignClient(name = "dm-pay-provider", configuration = DmConfiguration.class, fallback = DmPayTradeClientFallBack.class)
public interface DmPayTradeClient {
@RequestMapping(value = "/getDmPayTradeById",method = RequestMethod.POST)
public DmPayTrade getDmPayTradeById(@RequestParam("id") Long id)throws Exception;

@RequestMapping(value = "/getDmPayTradeListByMap",method = RequestMethod.POST)
public List<DmPayTrade>	getDmPayTradeListByMap(@RequestParam Map<String,Object> param)throws Exception;

@RequestMapping(value = "/getDmPayTradeCountByMap",method = RequestMethod.POST)
public Integer getDmPayTradeCountByMap(@RequestParam Map<String,Object> param)throws Exception;

@RequestMapping(value = "/qdtxAddDmPayTrade",method = RequestMethod.POST)
public Integer qdtxAddDmPayTrade(@RequestBody DmPayTrade dmPayTrade)throws Exception;

@RequestMapping(value = "/qdtxModifyDmPayTrade",method = RequestMethod.POST)
public Integer qdtxModifyDmPayTrade(@RequestBody DmPayTrade dmPayTrade)throws Exception;
}

